Skip to content

feat: Add enterprise edition support to firestore:databases:create #8952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Aug 12, 2025

Conversation

ehsannas
Copy link
Contributor

@ehsannas ehsannas commented Aug 7, 2025

Added a new --edition flag to the firestore:databases:create command. Valid values for it are standard and enterprise, case-insensitive (e.g. Enterprise, ENTERPRISE, etc are acceptable). The default value is standard and is equivalent to not providing the flag.

# existing command. Creates a "standard edition" database.
firebase firestore:databases:create

# Creates a "standard edition" dabatase (same as above)
firebase firestore:databases:create --edition standard

# Creates an "enterprise edition" dabatase
firebase firestore:databases:create --edition enterprise

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @ehsannas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

I've implemented a new feature that allows users to specify the edition (Standard or Enterprise) when creating a Firestore database. This enhancement provides greater control over database provisioning, catering to different operational needs. The change includes updates to the CLI command, API interfaces, configuration schema, and deployment logic, ensuring a seamless experience whether creating databases via the command line or through firebase.json.

Highlights

  • New --edition flag for Firestore database creation: I've added a new --edition flag to the firebase firestore:databases:create command. This allows users to specify whether they want to create a 'standard' or 'enterprise' edition Firestore database directly from the command line.
  • Flexible input and default behavior: The --edition flag is case-insensitive, meaning inputs like 'Enterprise' or 'ENTERPRISE' are accepted. If the flag is not provided, the database will default to the 'standard' edition, maintaining backward compatibility.
  • Support for firebase.json configuration: Beyond the command line, I've also enabled support for specifying the database edition within the firebase.json configuration file. This allows for declarative setup of Firestore databases, including their edition.
  • Input validation and error handling: I've implemented robust validation for the --edition flag and the edition field in firebase.json to ensure that only 'standard' or 'enterprise' are accepted values, providing clear error messages for invalid inputs.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for creating enterprise edition Firestore databases via the --edition flag in firestore:databases:create and through firebase.json. The changes look good overall, with new tests covering the functionality. I've provided a couple of suggestions to refactor the logic for parsing the new edition option to improve correctness and readability.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 43.75000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.84%. Comparing base (f1c2d21) to head (4fd98f9).
⚠️ Report is 29 commits behind head on master.

Files with missing lines Patch % Lines
src/deploy/firestore/deploy.ts 0.00% 8 Missing ⚠️
src/commands/firestore-databases-create.ts 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8952      +/-   ##
==========================================
- Coverage   52.18%   50.84%   -1.35%     
==========================================
  Files         418      504      +86     
  Lines       30694    33187    +2493     
  Branches     6348     6882     +534     
==========================================
+ Hits        16018    16873     +855     
- Misses      13234    14830    +1596     
- Partials     1442     1484      +42     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ehsannas
Copy link
Contributor Author

ehsannas commented Aug 8, 2025

also tested manually. @joehan see here

Copy link
Contributor

@joehan joehan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, lets just add a changelog entry

@ehsannas ehsannas merged commit 254a69c into master Aug 12, 2025
48 checks passed
@ehsannas ehsannas deleted the ehsann/create-enterprise-db branch August 12, 2025 20:28
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants